<?php

/**
 * @package					Joomla.Site
 * @subpackage			mod_bp_googlemaps 
 * @copyright				(C) 2012 DKI Services, LLC
 * @license					Commercial
 */

// no direct access
defined('_JEXEC') or die;

JLoader::register('ContentHelperRoute', JPATH_SITE.'/components/com_content/helpers/route.php');

class modBPGoogleMapsHelper
{
	public static function getMap($params)
	{
		// Initialise Return Variable and Page Parameters
		$map = array();
		$map['api_key'] = htmlspecialchars($params->get('google_api_key'));
		$map['height'] = htmlspecialchars($params->get('map_height'));
		$map['width'] = htmlspecialchars($params->get('map_width'));
		$map['city']	= htmlspecialchars($params->get('city_name'));
		$map['latitude'] = htmlspecialchars($params->get('latitude_option'));
		$map['longitude'] = htmlspecialchars($params->get('longitude_option'));
		$map['zoom_level'] = (int)$params->get('zoom_option', 12);
		$map['map_type'] = $params->get('map_type_option');
		$map['pan_control'] = (int)$params->get('pan_control', 1);
		$map['zoom_control'] = (int)$params->get('zoom_control', 1);
		$map['scale_control'] = (int)$params->get('scale_control', 1);
		$map['map_control'] = (int)$params->get('map_type_control', 1);
		$map['street_control'] = (int)$params->get('street_view_control', 1);
		$map['rotate_control'] = (int)$params->get('rotate_control', 1);
		$map['overview_control'] = (int)$params->get('overview_map_control', 1);
		
		return $map;
	}
}
